<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta charset="UTF-8">
    <title>test template</title>
    <script type="text/javascript" src="../static/template.js"></script>
</head>
<body>
<div id="app"></div>
<script type="text/html" id="main">
<ul>
    {{each list}}
    <li>{{$value}}</li>
    {{/each}}
</ul>
</script>
<script type="text/html" id="test">
<div>
    <ul>
        {{each person}}
        <li>{{$value.name}}</li>
        {{/each}}
    </ul>
    {{include 'main' a}}
</div>
</script>
<script type="text/javascript">
    var data = {
        person:[
            {name:"jack",age:18,sex:1},
            {name:"tom",age:19,sex:0},
            {name:"jerry",age:20,sex:0},
            {name:"kid",age:21,sex:1},
            {name:"jade",age:22,sex:0},
            {name:"lrving",age:23,sex:1},
        ],
        a:{
            list:['足球','篮球','排球','棒球','网球','羽毛球','乒乓球']
        }
    };
    var html = template('test',data);
    document.getElementById('app').innerHTML = html;
</script>
</body>
</html>